#ifndef MONITOR_DELETE_ACCOUNT_H_
#define MONITOR_DELETE_ACCOUNT_H_
#include <string>
#include <cairomm/context.h>

class DeleteAccount: public Gtk::Window {
private:
	Gtk::VBox box;
	Gtk::HBox hbox;
	Gtk::Entry user_entry;
	Gtk::Button accept_button, cancel_button;
	Monitor* m;
public:
	DeleteAccount(Monitor* m) :
			accept_button("Accept"), cancel_button("Cancel"),box(true,60) {
		set_title("Accounts delete");
		set_size_request(200, 200);
		set_modal(true);
		this->m = m;
		accept_button.signal_clicked().connect(
				sigc::mem_fun(*this, &DeleteAccount::on_accept_clicked));
		cancel_button.signal_clicked().connect(
				sigc::mem_fun(*this, &DeleteAccount::on_cancel_clicked));
		user_entry.set_max_length(12);
		user_entry.set_text("Account name");
		add(box);
		box.pack_start(user_entry);
		box.pack_start(hbox);
		hbox.pack_start(accept_button);
		hbox.pack_start(cancel_button);
		show_all_children();
	}

	void on_accept_clicked() {
		string user = user_entry.get_text();
		Gtk::MessageDialog dialog(*this, m->DeleteAccount(&user));
		dialog.run();
		Gtk::Main::quit();
	}

	void on_cancel_clicked() {
		Gtk::Main::quit();
	}

};


#endif /* MONITOR_DELETE_ACCOUNT_H_ */
